package org.example.model;


import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.example.entity.SysDept;

import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class DeptModel {

//    @JsonIgnore
    private Integer id;
    private String name;
    private String label;
    private Integer value;
    @JsonInclude(value= JsonInclude.Include.NON_EMPTY)
    private Integer parentId;
    private Integer orderNum;
    private String createBy;

    private Date createTime;

    private List<DeptModel> children;

    //父级公司
//    @JsonInclude(value= JsonInclude.Include.NON_EMPTY)
    private String parent;

    private Meta meta;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class Meta {

        private String label;
        private String value;
        private List<DeptModel> children;


    }

}
